<%-- 
    Document   : mac
    Created on : 27/07/2010, 15:18:38
    Author     : atila
--%>
<%@page import="org.madmac.servlet.action.Action"%>
<%@page import="org.madmac.servlet.form.Form"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Endereço MAC :: MAD MAC 1.0.1</title>
      <link rel="icon" href="/madmac/favicon.ico" type="image/x-icon" />
      <link rel="shortcut icon" href="/madmac/favicon.ico" type="image/x-icon" />
      <link rel="stylesheet" href="/madmac/menu_madmac_files/cbcscbmenu_madmac.css" type="text/css" />
		<link rel="stylesheet" href="/madmac/estilos/madmac_tables.css" type="text/css" />
      <link rel="stylesheet" href="/madmac/estilos/madmac_inputs.css" type="text/css" />
		<link rel="stylesheet" href="/madmac/estilos/madmac_divs.css" type="text/css" />
		<link rel="stylesheet" href="/madmac/estilos/madmac_others.css" type="text/css" />
      <script type="text/javascript" src="/madmac/madmacproject.js"></script>
      <script type="text/javascript" language="javascript" src="/madmac/paginacao/js/jquery.js"></script>
		<%
		// FORM
		if (request.getAttribute("form") != null) {
			if (Form.ADD.equals(request.getAttribute("form"))) {
      %>
      <script language="JavaScript" type="text/javascript">
			setNextField('mac');
         setCurrentForm('adicionar_mac');
         setNextPage('inserir_mac.jsp');
		</script>
		<%
			}
		// ACTION
		} else if (request.getAttribute("action") != null) {
			if (Action.LIST_ALL.equals(request.getAttribute("action"))) {
      %>
		<!-- PAGINAÇÃO VIA AJAX -->
		<style type="text/css" title="currentStyle">
			@import "/madmac/paginacao/css/demo_page.css";
			@import "/madmac/paginacao/css/demo_table.css";
		</style>
		<script type="text/javascript" language="javascript" src="/madmac/paginacao/js/jquery.dataTables.js"></script>
		<script type="text/javascript" charset="utf-8" language="javascript" src="/madmac/mac/js/mac.js"></script>
		<%
			}
		}
      %>
   </head>
   <body>
      <div class="logotype"><img src="/madmac/madmac-logo-1.0.1.png" height="120%" alt="MAD MAC"></div>

      <div class="menu_principal">
         <%@ include file="/common_pages/menu.jsp" %>
      </div>

      <div class="search_mac">
         <%@include file="/common_pages/search_mac.jsp" %>
      </div>

      <div class="corpo">
		<%
		// form
		if (request.getAttribute("form") != null) {
			if (Form.ADD.equals(request.getAttribute("form"))) {
				%>
				<%@include file="/mac/macCreate.jsp" %>
				<%
			}
		// action
		} else if (request.getAttribute("action") != null) {
			if (Action.LIST.equals(request.getAttribute("action"))) {
				%>
				<%@include file="/mac/macList.jsp" %>
				<%
			} else if (Action.LIST_ALL.equals(request.getAttribute("action"))) {
				%>
				<%@include file="/mac/macListAll.jsp" %>
				<%
			}
		}
		%>
		</div>
      <div class="footer_madmac">
         <%@include file="/common_pages/footer.jsp" %>
      </div>
   </body>
</html>